﻿using System;
using System.Text;
using Newtonsoft.Json;

namespace TimberSmart.Console
{
    class Program
    {
        static void Main(string[] args)
        {
        
            System.Console.WriteLine("*Start*");
            System.Console.WriteLine("--------");

            var JSONSettings = new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore };

            var unit1 = new Data.TimberSmartUow();
            
            var user1 = unit1.UserRepository.FindUserByUsername("Joel");

            var menu1 = unit1.UserRepository.FindMenusForUser(user1.Id);

            System.Console.WriteLine(JsonConvert.SerializeObject(menu1, Formatting.Indented, JSONSettings));

            System.Console.WriteLine();
            System.Console.WriteLine("--------");
            System.Console.WriteLine("*End*");
            System.Console.WriteLine("Press any key to continue.");
            System.Console.ReadKey();
        }     
    }
}
